#ifndef DWGRECTITEM_H
#define DWGRECTITEM_H

#include "dwgobjectitem.h"

class DwgRectItem : public DwgObjectItem
{
    Q_OBJECT
public:
    DwgRectItem();
    DwgRectItem(QPointF pt1,QPointF pt2);

    QPointF mLTPt,mRBPt;

    void DrawSnapRect(QPainter *painter, QPointF cpt);

    // QGraphicsItem interface
public:
    QRectF boundingRect() const override;
    QPainterPath shape() const override;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;

    // QGraphicsItem interface
protected:
    void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
    void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
};

#endif // DWGRECTITEM_H
